package com.renbang.utils.quartz;

import java.util.Date;

import org.apache.log4j.Logger;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

import com.renbang.model.art.ArtJian;
import com.renbang.utils.drawandindex.JsoupForJianshu;

/**
 * 一个简单的quartz调用job
 * 
 */
public class HelloJob implements Job {
	@Autowired
	JsoupForJianshu jsoupForJianshu;

//	private static Logger log = Logger.getLogger(HelloJob.class);

	public HelloJob() {
	}

	public void execute(JobExecutionContext context)  
        throws JobExecutionException {
		//调用解析简书网站方法
		jsoupForJianshu.crawlerForJianShu();
//    	ArtJian word = (ArtJian) context.getMergedJobDataMap()
//				.get("Hellojob");
//    	System.out.println(word);
    	System.out.println("运行中。。。"+new Date());
    }}